package com.xie.smfs.item;

import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ActionResult;
import net.minecraft.util.Hand;
import net.minecraft.util.TypedActionResult;
import net.minecraft.world.World;
import net.minecraft.entity.player.PlayerEntity;

public class PhotoItem extends Item {
    public PhotoItem(Settings settings) {
        super(settings);
    }

    // 检查照片是否被命名
    public static boolean isNamedPhoto(ItemStack stack) {
        return stack.getItem() instanceof PhotoItem && stack.hasCustomName();
    }

    @Override
    public TypedActionResult<ItemStack> use(World world, PlayerEntity user, Hand hand) {
        // 照片的特殊使用逻辑将在后续实现
        return TypedActionResult.pass(user.getStackInHand(hand));
    }
}